
Modify the configuration of the forest identified by {id|name}.
| URL Parameters | |
|---|---|
| format | The format of the returned data. Can be
html, json or xml (default). If present, the
format parameter overrides the Accept header. |
Upon success, MarkLogic Server returns a status code 204 (No Content).
manage-admin rolehttp://marklogic.com/xdmp/privileges/manage
http://marklogic.com/xdmp/privileges/admin/forest
manage role plus one of the following granular privileges:
http://marklogic.com/xdmp/privileges/admin/foresthttp://marklogic.com/xdmp/privileges/admin/forest/forest-ID Properties included in the payload replace the existing configuration of the same
property, if any. All other properties remain unchanged. Replacement applies even where
multiple property values are supported, such as replica forests. For example, if the request
includes configuration for forest-replicas, all previously existing replica
configuration is replaced. The operation is not additive.
Note: The properties
described here are for XML payloads. In general they are the same for JSON, with the
exception that, in JSON, failover-hosts and forest-replicas are
expressed in singular form. For example, in JSON, failover-hosts is instead
failover-host and the format is: "failover-host":["hostname"].
Note that adding or removing a replica forest to/from a master forest will take the master forest offline.
The structure of the modifiable properties is as follows:
The following properties are immutable: database, host,
data-directory, large-data-directory, and
fast-data-directory.
If database replication is configured such that the connect-forests-by-name
property is false, then forest-level replication can be changed with the
database-replication properties of the forests. Specify
foreign replicas on the replica forests and foreign-master
on the master forest.
databaseforest-nameenabledhostdata-directorylarge-data-directoryfast-data-directoryfast-data-max-sizeupdates-allowedavailabilityrebalancer-enablerangeThis is a complex structure with the following children:
lower-boundupper-boundpartition-numberfailover-enablefailover-hostsThis is a complex structure with the following children:
failover-hostforest-backupsThis is a complex structure with the following children:
forest-backupThis is a complex structure with the following children:
backup-idbackup-enabledbackup-directorybackup-typebackup-periodbackup-month-daybackup-daysThis is a complex structure with the following children:
backup-daybackup-start-datebackup-start-timebackup-timestampforest-replicasThis is a complex structure with the following children:
forest-replicaThis is a complex structure with the following children:
hostreplica-namedata-directorylarge-data-directoryfast-data-directorydatabase-replicationThis is a complex structure with the following children:
foreign-replicasThis is a complex structure with the following children:
foreign-replicaThis is a complex structure with the following children:
foreign-cluster-nameforeign-database-nameforeign-forest-nameforeign-masterThis is a complex structure with the following children:
foreign-cluster-nameforeign-database-nameforeign-forest-name
$ cat ./forest-properties.xml
==>
<forest-properties xmlns="http://marklogic.com/manage">
<enabled>false</enabled>
</forest-properties>
$ cat ./forest-properties.json
==>
{ "enabled": true }
$ curl --anyauth --user user:password -X PUT -d @./forest-properties.xml \
-i -H "Content-type: application/xml" \
http://localhost:8002/manage/v2/forests/example-1/properties
==> The enabled property of the forest named example-1 is set to false.
All other properties are unchanged. MarkLogic Server responds with
output similar to the following:
HTTP/1.1 204 No Content
Server: MarkLogic
Content-Length: 0
Connection: Keep-Alive
Keep-Alive: timeout=5